feat(cli): align PROXY Protocol configuration with node_listen and ssl.listen, add IPv6 support #12859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request aligns the configuration and handling of PROXY Protocol listen ports with the structure used for
node_listenandssl.listen. It adds support for specifying multiple ports and IP addresses (including IPv6), introduces schema validation improvements, ensures backward compatibility with legacy options, and updates documentation.Key Changes:
Configuration and Schema Improvements:
proxy_protocol.listen_httpandproxy_protocol.listen_httpsas new configuration options.proxy_protocol.listen_http_portandproxy_protocol.listen_https_portfields for PROXY Protocol while ensuring backward compatibility.config.yaml.exampleto document the new structure and usage patterns for PROXY Protocol listen options.Backward Compatibility & Warnings:
proxy_protocol.listen_http_portandproxy_protocol.listen_https_portfields, issuing warnings, and internally treats them the same as the new configuration (only when legacy fields are present).Template, Runtime, and IPv6 Support:
ngx_tpl.lua) to uselisten_httpandlisten_httpsfields.listendirectives for IPv6 addresses.Documentation Updates:
listen_http_portandlisten_https_porttolisten_http/listen_https.Testing Enhancements:
proxy_protocol.listen_http_portandproxy_protocol.listen_https_port.listen_httpandlisten_httpsformats, IPv4/IPv6 combinations, and support for QUIC/HTTP3.Which issue(s) this PR fixes:
Fixes #12828
Checklist
Notes for Reviewers
Note: AI helped format this Pull Request.